var HTMLContainer = Rectangle.extend({
    init: function(origin, HTMLNode){
        this._HTMLNode = HTMLNode;
        this._super(origin, 0, 0);
        this.computeDimensions();
    },
    setHTMLNode: function(HTMLNode){
        this._HTMLNode = HTMLNode;
        this.computeDimensions();
    },
    getHTMLNode: function(){
        return this._HTMLNode;
    },
    computeDimensions: function(){
        var body = document.getElementsByTagName('body')[0];
        body.appendChild(this._HTMLNode);
        this.setWidth(this._HTMLNode.offsetWidth);
        this.setHeight(this._HTMLNode.offsetHeight);
        body.removeChild(this._HTMLNode);
    }
});